import request from '@/utils/request';

export async function removeCourse(params) {
  return request('/api/course', {
    method: 'DELETE',
    data: {
      ...params,
      method: 'delete',
    },
  });
}

export async function updateCourse(params) {
  return request('/api/course', {
    method: 'PUT',
    data: {
      ...params
    },
  });
}

export async function queryCourse(params) {
  return request('/api/course', {
    method: 'GET',
    params: {
      ...params
    },
  });
}

export async function addCourse(params) {
  console.log(params)
  return request('/api/course', {
    method: 'POST',
    data: {
      ...params,
      method: 'post',
    },
  });
}
export async function queryClassroom() {
  return request('/api/classroom', {
    method: 'GET',
    data: {
    },
  });
}
export async function queryTeacher() {
  return request('/api/teacher', {
    method: 'GET',
    data: {
    },
  });
}
export async function queryDepartment() {
  return request('/api/department', {
    method: 'GET',
    data: {
    },
  });
}
